package com.woniu.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

@Data
@ApiModel("修改折扣参数对象")
public class UpdateDiscountForm {
    @NotBlank(message = "商品id不能为空")
    @ApiModelProperty(value = "商品id")
    private String storeProductId;
    @NotNull(message = "折扣不能为空")
    @Positive(message = "折扣必须为正数")
    @Max(value = 1, message = "折扣不能大于1")
    @ApiModelProperty(value = "折扣")
    private Double discount;
}
